<!doctype html>
<html lang="en">

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>Dashboard Template for Bootstrap</title>
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/bootstrap.min.css" />
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/type.css" />
		<script type="text/javascript" src="__PUBLIC__/js/jquery.min.js"></script>
		<script type="text/javascript" src="__PUBLIC__/js/bootstrap.min.js"></script>
		<style type="text/css">
			.cart-items {
				width: 70%;
				margin-right: 5%;
			}
			
			.cart_span1 {
				font-size: 16px;
			}
			
			.cart_span2 {
				font-size: 14px;
				color: #ADADAD;
			}
			
			.cart_span3 {
				color: #FB741F;
				font-size: 14px;
			}
			
			.cart-header {
				position: relative;
			}
			
			.cart-header2 {
				position: relative;
				clear:leftl;
			}
			/*del*/
			
			.close1,
			.close2 {
				background: url('__PUBLIC__/images/cart/close_1.png') no-repeat 0px 0px;
				cursor: pointer;
				width: 28px;
				height: 28px;
				position: absolute;
				right: 0px;
				top: 0px;
			}
			/*信息位置*/
			
			.cart-item {
				width: 20%;
				float: left;
				margin-right: 5%;
			}
			
			a.continue {
				background: #5B88BB;
				padding: 10px 20px;
				font-size: 1em;
				color: #000;
				text-decoration: none;
				display: block;
				text-align: center;
				margin-bottom: 2em;
			}
			
			.price-details {
				border-bottom: 1px solid #DDD9D9;
				padding-bottom: 10px;
			}
			/*右边列表*/
			
			.price-details span {
				width: 50%;
				float: left;
				font-size: 1em;
				color: #000;
				line-height: 1.8em;
				text-align: center;
			}
			
			.cart_total {
				text-align: center;
			}
			/*--responsive design--*/
			
			@media (max-width:1024px) {
				.cart-items {
					width: 100%;
					margin-right: 0;
				}
			}
			
			/*购物车列表样式*/
			.cart{
			     clear:left;
			     list-type:none;
			}
			.cart li{
			      width:100px;
			}
		</style>
	</head>

	<body>
		<header>
			<div class="col-md-12 col-xs-12">
				<div class="col-md-4 col-xs-3"></div>
				<div class="col-md-4 col-xs-6 text-center">
					<h2>购物车</h2></div>
				<div class="col-md-4 col-xs-3"></div>
			</div>
			<div class="col-md-12 col-xs-12">
				<div class="col-md-1"></div>
				<div class="col-md-10 col-xs-12">
					<hr style="border: groove #ddd 1px;">
				</div>
				<div class="col-md-1"></div>
			</div>
		</header>
		<neq name="cart" value=""> 
<form method="post" action="__MODULE__/User/addorder">
		<section>
			<div class="col-md-1"></div>
			<div class="container col-md-10 col-xs-12">
				<div class="check_box">
					<div class="col-md-8 cart-items ">
		            
						<script>
							$(document).ready(function(c) {
								$('.close2').on('click', function(c) {
									$('.cart-header2').fadeOut('slow', function(c) {
										$('.cart-header2').remove();
									});
								});
var total=0;
for(var i=0;i<$(".price").length;i++){
	total+=parseInt($(".price:eq("+i+")").val())*parseInt($(".count:eq("+i+")").val());
}
$("#total").text(total);
$("#totalmoney").val(total);
								
							});
						</script>
						<div class="cart-header2">
							
							<foreach name="cart" item="c">
							<div class="cart-sec">
								<div class="cart-item">
									<img src="__PUBLIC__/uploads/img/{$c.PictureUrl}" class="img-responsive" alt="" />
								</div>
								
								<div class="cart_info">
								<input type="hidden" value="{$c.GoodId}" name="GoodId[]"/>
									<span class="cart_span1"><a href="#">{$c.GoodName}</a></span><br><input type="hidden" value="{$c.GoodName}" name="GoodName[]"/>
									<div class="col-md-3 col-xs-3 index_span2">
										<span class="cart_span2">{$c.Color}</span><br><input type="hidden" value="{$c.Color}" name="Color[]"/>
										<span class="cart_span2">{$c.Version}</span><input type="hidden" value="{$c.Version}" name="Version[]"/>
										
									</div>
									<div class="col-md-1 col-xs-1"></div>
									<div>
										<input type="text" class="col-md-3 col-xs-3" value="{$c.Count}" readonly/><input type="hidden" value="{$c.Count}" name="GoodCount[]" class="count"/>
									</div>
									<div class="col-md-1 col-xs-1"></div>
									<div class="col-md-2 col-xs-3 index_span3">
										<span class="cart_span3"> {$c.Price}</span><input type="hidden" value="{$c.Price}" name="Price[]" class="price"/>
									</div>
									<div class="col-md-2 col-xs-3 index_span3">
										<span class="cart_span3"><a href="__MODULE__/Cart/del/gid/{$c.GoodId}/userId/{$c.user_UserId}/color/{$c.Color}/version/{$c.Version}">删除</a></span>
									</div>
									<div class="clearfix"></div>
								</div>
								
							</div>
							</foreach>

						</div>
					</div>
				</div>

				<div class="col-md-3">
					<a class="continue" href="#">价格明细</a>
					
					<div class="price-details">

						<span>总价：</span>
						<span id="total"></span>
<input type="hidden" value="" name="TotalMoney" id="totalmoney"/>
						<div class="clearfix"></div>
					</div>
					
				</div>
				<div class="col-md-1"></div>
		</section>
		<div class="col-md-12 col-xs-12">
			<div class="col-md-4"></div>
			<div class="col-md-4 cart_total"><button type="submit" class="btn btn-primary" >提交订单</button></div>
			<div class="col-md-4"></div>
		</div>
</form>
</neq>
<eq name="cart" value=""><center><h2>还没有添加商品，快去采购吧~</h2></center></eq>
	</body>

</html>